/*
 * @Author: MiNine
 * @Date: 2020-09-18 17:54:09
 * @LastEditors: MiNine
 * @LastEditTime: 2020-09-19 10:03:16
 * @Description: 
 */
//connect DB
const mongoose = require('mongoose');

const databaseName = 'insuranceDateBase';
// const url = 'localhost:27017';
const url = '192.168.7.73:27017';

const dbURL = `mongodb://${url}/${databaseName}`;

mongoose.connect(dbURL, {
  useNewUrlParser: true,
  useUnifiedTopology: true
});

//connect success
mongoose.connection.once('open', () => {
  console.log(dbURL + "connect success");
})